﻿using PmSadis.Models.Abstract;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Collections.Generic;
using System;

namespace PmSadis.Models
{
    /// <summary>
    /// Подрядчик
    /// </summary>
    [Table("D_SUB_CONTRACTOR")]
    [MetadataType(typeof(SubContractorMetadata))]
    public class SubContractor : Contractor
    {
        /// <summary>
        /// Генконтракт генподрядчика
        /// </summary>
        [Column("SUB_CONTRACTOR_ID")]
        [Key]
        public int SubContractorId { get; set; }

        /// <summary>
        /// Контракты подрядчика
        /// </summary>
        public virtual ICollection<SubContract> SubContracts { get; set; }
        
    }

    sealed class SubContractorMetadata : ContractorMetadata
    {
        
    }
}
